
/**
 *  API
 * ---------------------
 *
 */
var SVGUtil = (function(){

  var ns    = 'http://www.w3.org/2000/svg';
  var xmlns = 'http://www.w3.org/2000/xmlns/';
  var xlink = 'http://www.w3.org/1999/xlink';

  var SVGUtil = function(){

    this.supported = (function() {
      return !! document.createElementNS &&
             !! document.createElementNS(ns,'svg').createSVGRect
      })();
  }

  SVGUtil.prototype = {
    create : function(name){

      var element = null;
      if(document.createElementNS){
          element = document.createElementNS(ns, name)
      }else{
          element = document.createElement(name)
      }
        return element
    },
    newText : function(text){
      return document.createTextNode(text);
    },
    namespace : function(ele){
      ele.setAttribute("xmlns", ns);
      ele.setAttribute("version", "1.1");
      ele.setAttribute("xmlns:xlink", xlink);
      ele.setAttribute("xmlns:workflow", "http://www.seeyon.com/");
    }
  }

  return new SVGUtil();
})();



/******************************************************************************************/

